/**
 * NearShop
 * Adv.java
 * com.android.nearshop.business.model
 * 
 */
package com.wise.site.protocol.result;

import org.json.JSONException;
import org.json.JSONObject;

import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;

import com.wise.site.protocol.base.SoapItem;
import com.wise.site.utils.Constanct;

/*********************************************************
 * @author : zhaohua
 * @version : 2012-8-11
 * @see : 
 * @Copyright : copyrights reserved by personal 2007-2012
 **********************************************************/
public class Adv extends SoapItem
{

    /** 是   N   广告Id。*/
    public  int  id;
    /** 标题 */
    public String title;
    /** 是   C   广告图片地址。*/
    public String imageUrl;
    /** 是   N   广告类型。*/
    public int type;

    public String url;
    
    public BitmapDrawable bitmap;
    
    public Adv() {
		super();
	}
    
    public Adv(JSONObject node) {
		super(node);
	}
    
    public void parse(JSONObject node) throws JSONException
    {
    	id = node.getInt("id");
    	title = node.getString("title");
    	imageUrl = node.getString("imageUrl");
    	url = node.getString("url");
    	type = node.getInt("type");
    }
    
    public void advToSuper(AdvSuper adv){
		id = adv.id;
		title = adv.title;
		imageUrl = adv.imageUrl;
		type = adv.type;
		url = adv.url;
	}
}
